package pl.enigmatic.parser.string.custom;

import pl.enigmatic.parser.string.Converter;


/**
 * Does exactly the same as {@link TimeSecondsDoubleConverter} but operates on <code>long</code> values instead of <code>double</code>.
 * 
 * @author reggie_7
 * 
 */
public class TimeSecondsLongConverter extends Converter<Long> {

	private final TimeSecondsDoubleConverter delegate = new TimeSecondsDoubleConverter();

	@Override
	public Long convert(final String value) {
		return Math.round(delegate.convert(value));
	}

	@Override
	public String convertBack(final Long value) {
		return delegate.convertBack((double) value);
	}

}
